#!/bin/sh

LOGS=/logs/current

while [ `ls $LOGS/done_create | wc -l` = "0" ]
do
  sleep 5
done

TAPENUM=`ls -1 $LOGS/done_create | head -1`
mv $LOGS/done_create/$TAPENUM $LOGS/comparing
/sbin/mtx load $TAPENUM 1
/bin/tar dvMfF /dev/nst1 /usr/local/bin/yz_change_compare_tape.sh

TAPENUM=`ls $LOGS/comparing`
/sbin/mtx unload $TAPENUM 1
mv $LOGS/comparing/$TAPENUM $LOGS/done_compare


